<?php
		
	/* SVN FILE: $Id: summary.php 8 2011-03-13 08:32:38Z michele.andreoletti@gmail.com $ */
	
	/**
	* Project Name : arcadia
	*
	* @author $Author: michele.andreoletti@gmail.com $
	* @version $Revision: 8 $
	* @lastrevision $Date: 2011-03-13 08:32:38 +0000 (Sun, 13 Mar 2011) $
	* @filesource $URL: http://arcadia.googlecode.com/svn/trunk/include/summary.php $
	*/
			
	date_default_timezone_set('Europe/Rome');

	if(isset($_GET['sAPP']) && !empty($_GET['sAPP'])) {
		$sAPP = $_GET['sAPP'];	
	
	} else {
		require_once "./const.inc.php";
		require_once "./functions.php";
		// require_once "./auth.inc.php";
		require_once "./conn.inc.php";
		
		fnUpdateLog('APP NOT DEFINED', 0, '', 'E');
		echo fnJsonOutput(fnCurrentScript(), '', '', 888);
		die();
	
	}

	require_once "../$sAPP/include/const.inc.php";
	require_once "../$sAPP/include/functions.php";
	require_once "./auth.inc.php";
	require_once "./conn.inc.php";

	fnGetValueFromGET(array('sField','sAction','sTable','sAPP'));
	
	$sScript = fnCurrentScript();

	$bSummaryShow = (is_null(fnReadSessionValue('bSummaryShow', 'main-table', $sAPP, $sTable)) || !fnReadSessionValue('bSummaryShow', 'main-table', $sAPP, $sTable) ? false : true);
	
	fnSaveSessionValue(!$bSummaryShow, 'bSummaryShow', 'main-table', $sAPP, $sTable);
	
	$sOutput = fnJsonOutput($sScript, $sAction, '', 0, array('bSummaryShow'=>($bSummaryShow ? 'true' : 'false')));
	
	echo $sOutput;	
	die();
	
?>